package com.macro.mall.common.exception;

/**
 * 统一异常
 */
public class ZjException extends RuntimeException{
    private final  Integer code;
    private final  String message;

    public ZjException(Integer code, String message) {
        this.code=code;
        this.message=message;
    }

    public ZjException(ZjExceptionEnum exceptionEnum){
        this(exceptionEnum.getCode(),exceptionEnum.getMsg());
    }

    public Integer getCode() {
        return code;
    }

    @Override
    public String getMessage() {
        return message;
    }
}
